# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=python-phitigra
_pyname=${pkgname#python-}
pkgver=0.2.6
pkgrel=2
pkgdesc='A graph editor for SageMath/Jupyter'
url='https://github.com/jfraymond/phitigra'
arch=(any)
license=(MIT)
source=(https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_pyname-$pkgver.tar.gz)
depends=(sagemath python-ipycanvas)
makedepends=(python-build python-installer python-wheel)
sha256sums=('36cdc745316b876a4f675212b9a994439d2d9a1b3b12c4e8cce4a149304a9ba0')

build() {
  cd $_pyname-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $_pyname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
